<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page isELIgnored="false"%>
<html>
<head>
    <jsp:include page="layout/_import.jsp"></jsp:include>
    <link rel="stylesheet" href="css/register.css">
    <title>注册界面</title>
</head>
<body>
<jsp:include page="layout/_nav.jsp"></jsp:include>
<div id="container">
    <div id="herder">
        <div class="jumbotron jumbotron-fluid">
            <div class="container">
                <h1 class="display-4">社区宠物诊所·注册</h1>
                <p class="lead">This is a community pet hospital, where pets can have family like warmth and join us</p>
            </div>
        </div>
    </div>
    <div class="alert alert-success" role="alert" hidden>
        注册成功！
    </div>
    <div class="alert alert-danger" role="alert" hidden>
        注册失败！
    </div>
    <main>
        <form id="RegisterForm" action="RegisterServlet" method="post">
                <div class="row">
				<span class="col col-md-2">
					用户名
				</span>
                    <div class="col col-md-10">
                        <input type="text" class="form-control" name="name">
                    </div>
                </div>
                <div class="row">
				<span class="col col-md-2">
					密码
				</span>
                    <div class="col col-md-10">
                        <input type="password" class="form-control" name="pwd">
                    </div>
                </div>
                <div class="reg">
                    <h2><input type="submit" name="regs" id="regs" value="立即注册" class="button" onclick="reg()"></h2>
                </div>
        </form>
    </main>
</div>
<script>
    function reg() {
        var ID = document.getElementById("ID");
        if (ID.value !== 'mochen' ) {
            alert('请输入正确的账号ID')
        }
        else {
            alert("注册成功");
            window.open("http://www.baidu.com")
        }
    }
</script>

</body>
</html>
